package com.lyx.fileio;

import java.io.*;

public class TestCopy01 {
    public static void main(String[] args) throws IOException {
        File file = new File("c:\\readme.txt");

        InputStream inputStream = new FileInputStream(file);
        OutputStream outputStream = new FileOutputStream("c:\\reademe2.txt");
        int n;
        n = inputStream.read();
        while (n != -1){
            outputStream.write(n);
            n = inputStream.read();
        }
        inputStream.close();
        outputStream.close();
    }
}
